Skip to content

Conversation

@melloware
Copy link
Owner

@melloware melloware commented Mar 15, 2024

Based on this https://stackoverflow.com/a/62109988/502366

This jQuery style for screenreaders has not changed in a long time but now that browser have advanced it is missing some features explained in the stack overflow.

    border: 0;
    padding: 0;
    margin: 0;
    position: absolute !important;
    height: 1px; 
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); /*maybe deprecated but we need to support legacy browsers */
    clip-path: inset(50%); /*modern browsers, clip-path works inwards from each corner*/
    white-space: nowrap; /* added line to stop words getting smushed together (as they go onto seperate lines and some screen readers do not understand line feeds as a space */

@melloware melloware merged commit 709f7ac into main Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants